package com.ns.scs.sms.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ns.core.vo.bs.BaseVO;
import com.ns.scs.sms.dto.SmsPageDto;
import com.ns.scs.sms.entry.SmsTemplate;
import com.ns.scs.sms.mapper.SmsTemplateMapper;
import com.ns.scs.sms.vo.SmsTemplateVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 参数业务实现
 *
 * @author lw
 * @since 2024/09/23
 */
@Service
@RequiredArgsConstructor
@Slf4j
public class SmsTemplateServiceImpl extends ServiceImpl<SmsTemplateMapper, SmsTemplate> implements ISmsTemplateService {
    private final SmsTemplateMapper mapper;

    @Override
    public Page<SmsTemplateVO> getList(SmsPageDto dto) {
        return mapper.getList(dto, new Page<>(dto.getCurrent(), dto.getSize()));
    }

    @Override
    public List<BaseVO> getOptions(SmsPageDto dto) {
        return mapper.getOptions(dto);
    }
}
